﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls; 
using System.Collections.Generic;
using HZ.Supervise.IBLL;
using HZ.Supervise.Model.Enum;

namespace HZ.Supervise.Web.SystemManage
{
    public partial class CompanyDetailInfo : BasePage
    {
        public CompanyDetailInfo()
        {
            this.ModuleNo = Module.基础信息库.ToString();
            PageOperateType = OperateType.配送企业信息.ToString();
        }

        IBLL_PreWarning ip = HZ.Supervise.BLLFactory.IBLL_PreWarning();
        protected void Page_Load(object sender, EventArgs e)
        {
  
            //绑定企业基本信息
            if (!IsPostBack)
            {
                HZ.Supervise.Model.Company com = new HZ.Supervise.Model.Company();
                com.CompanyID = Request.QueryString["CompanyID"];
                int totalCount = 0;
                DataTable dt = ip.GetCompanyInfo(com, 1,0, out totalCount);
                foreach (DataRow dr in dt.Rows)
                {
                    lblAddress.Text = dr["Address"].ToString(); 
                    lblBusinessCertificate.Text = dr["Address"].ToString();
                    lblBusinessCertificateDate.Text = dr["BusinessCertificateDate"] != null && dr["BusinessCertificateDate"] .ToString ()!=""? Convert.ToDateTime(dr["BusinessCertificateDate"]).ToString("yyyy-MM-dd") : "--";
                    lblBusinessRange.Text = dr["BusinessRange"].ToString();
                    lblcompanyname.Text =  dr["CompanyName"].ToString(); 
                    lblContactPerson.Text = dr["ContactPerson"].ToString(); 
                    lblFax.Text =  dr["Fax"].ToString();
                    lblGSPCode.Text = dr["GSPCode"].ToString();
                    lblGSPTime.Text = dr["GSPTime"] != null && dr["GSPTime"].ToString()!="" ? Convert.ToDateTime(dr["GSPTime"]).ToString("yyyy-MM-dd") : "--";
                    lblLayMan.Text = dr["LayMan"].ToString(); 
                    lblMobile.Text = dr["CellNo"].ToString(); 
                    lblRemarks.Text = dr["Remarks"].ToString(); 
                    lblTelNo.Text = dr["TelNo"].ToString(); 
                    lblWebsite.Text = dr["Website"].ToString(); 
                }
            }
        }
    }
}
